package com.lbx.service;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @author 吕兵星
 * @date 2020/10/21 20:18
 */
@Component
@Aspect
public class MyAspectAnno{

//    @Pointcut("execution(* com.lbx.service.MyServiceImpl.add())")
//    public void myPointCut(){};

    @Before("execution(* com.lbx.service.MyServiceImpl.*(..))")
    public  void  before(){
        System.out.println("=========before=========");
    }
    @After("execution(* com.lbx.service.MyServiceImpl.*(..))")
    public  void  after(){
        System.out.println("=========after=========");
    }
}
